home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / info / emacs-3.z / emacs-3
Encoding:
GNU Info File  |  1998-10-28  |  47.3 KB  |  1,106 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.63 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Exiting,  Next: Basic,  Prev: Entering Emacs,  Up: Top
  6.  
  7. Exiting Emacs
  8. =============
  9.  
  10.    There are two commands for exiting Emacs because there are two kinds
  11. of exiting: "suspending" Emacs and "killing" Emacs.
  12.  
  13.    "Suspending" means stopping Emacs temporarily and returning control
  14. to its parent process (usually a shell), allowing you to resume editing
  15. later in the same Emacs job, with the same buffers, same kill ring,
  16. same undo history, and so on.  This is the usual way to exit.
  17.  
  18.    "Killing" Emacs means destroying the Emacs job.  You can run Emacs
  19. again later, but you will get a fresh Emacs; there is no way to resume
  20. the same editing session after it has been killed.
  21.  
  22. `C-z'
  23.      Suspend Emacs (`suspend-emacs') or iconify a frame
  24.      (`iconify-or-deiconify-frame').
  25.  
  26. `C-x C-c'
  27.      Kill Emacs (`save-buffers-kill-emacs').
  28.  
  29.    To suspend Emacs, type `C-z' (`suspend-emacs').  This takes you back
  30. to the shell from which you invoked Emacs.  You can resume Emacs with
  31. the shell command `%emacs' in most common shells.
  32.  
  33.    On systems that do not support suspending programs, `C-z' starts an
  34. inferior shell that communicates directly with the terminal.  Emacs
  35. waits until you exit the subshell.  (The way to do that is probably
  36. with `C-d' or `exit', but it depends on which shell you use.)  The only
  37. way on these systems to get back to the shell from which Emacs was run
  38. (to log out, for example) is to kill Emacs.
  39.  
  40.    Suspending also fails if you run Emacs under a shell that doesn't
  41. support suspending programs, even if the system itself does support it.
  42. In such a case, you can set the variable `cannot-suspend' to a
  43. non-`nil' value to force `C-z' to start an inferior shell.  (One might
  44. also describe Emacs's parent shell as "inferior" for failing to support
  45. job control properly, but that is a matter of taste.)
  46.  
  47.    When Emacs communicates directly with an X server and creates its own
  48. dedicated X windows, `C-z' has a different meaning.  Suspending an
  49. applications that uses its own X windows is not meaningful or useful.
  50. Instead, `C-z' runs the command `iconify-or-deiconify-frame', which
  51. temporarily closes up the selected Emacs frame (*note Frames::.).  The
  52. way to get back to a shell window is with the window manager.
  53.  
  54.    To kill Emacs, type `C-x C-c' (`save-buffers-kill-emacs').  A
  55. two-character key is used for this to make it harder to type.  This
  56. command first offers to save any modified file-visiting buffers.  If you
  57. do not save them all, it asks for reconfirmation with `yes' before
  58. killing Emacs, since any changes not saved will be lost forever.  Also,
  59. if any subprocesses are still running, `C-x C-c' asks for confirmation
  60. about them, since killing Emacs will kill the subprocesses immediately.
  61.  
  62.    There is no way to restart an Emacs session once you have killed it.
  63. You can, however, arrange for Emacs to record certain session
  64. information, such as which files are visited, when you kill it, so that
  65. the next time you restart Emacs it will try to visit the same files and
  66. so on.  *Note Saving Emacs Sessions::.
  67.  
  68.    The operating system usually listens for certain special characters
  69. whose meaning is to kill or suspend the program you are running.  This
  70. operating system feature is turned off while you are in Emacs.  The
  71. meanings of `C-z' and `C-x C-c' as keys in Emacs were inspired by the
  72. use of `C-z' and `C-c' on several operating systems as the characters
  73. for stopping or killing a program, but that is their only relationship
  74. with the operating system.  You can customize these keys to run any
  75. commands of your choice (*note Keymaps::.).
  76.  
  77. 
  78. File: emacs,  Node: Basic,  Next: Minibuffer,  Prev: Exiting,  Up: Top
  79.  
  80. Basic Editing Commands
  81. **********************
  82.  
  83.    We now give the basics of how to enter text, make corrections, and
  84. save the text in a file.  If this material is new to you, you might
  85. learn it more easily by running the Emacs learn-by-doing tutorial.  To
  86. use the tutorial, run Emacs and type `Control-h t'
  87. (`help-with-tutorial').
  88.  
  89.    To clear the screen and redisplay, type `C-l' (`recenter').
  90.  
  91. * Menu:
  92.  
  93. * Inserting Text::     Inserting text by simply typing it.
  94. * Moving Point::       How to move the cursor to the place where you want to
  95.                  change something.
  96. * Erasing::           Deleting and killing text.
  97. * Undo::               Undoing previous changes.
  98. * Files: Basic Files.  Visiting, creating, and saving files.
  99. * Help: Basic Help.    Asking what a character does.
  100. * Blank Lines::        Commands to make or delete blank lines.
  101. * Continuation Lines:: Lines too wide for the screen.
  102. * Position Info::      What page, line, row, or column is point on?
  103. * Arguments::           Numeric arguments for repeating a command.
  104.  
  105. 
  106. File: emacs,  Node: Inserting Text,  Next: Moving Point,  Up: Basic
  107.  
  108. Inserting Text
  109. ==============
  110.  
  111.    To insert printing characters into the text you are editing, just
  112. type them.  This inserts the characters you type into the buffer at the
  113. cursor (that is, at "point"; *note Point::.).  The cursor moves
  114. forward, and any text after the cursor moves forward too.  If the text
  115. in the buffer is `FOOBAR', with the cursor before the `B', then if you
  116. type `XX', you get `FOOXXBAR', with the cursor still before the `B'.
  117.  
  118.    To "delete" text you have just inserted, use DEL.  DEL deletes the
  119. character *before* the cursor (not the one that the cursor is on top of
  120. or under; that is the character AFTER the cursor).  The cursor and all
  121. characters after it move backwards.  Therefore, if you type a printing
  122. character and then type DEL, they cancel out.
  123.  
  124.    To end a line and start typing a new one, type RET.  This inserts a
  125. newline character in the buffer.  If point is in the middle of a line,
  126. RET splits the line.  Typing DEL when the cursor is at the beginning of
  127. a line deletes the preceding newline, thus joining the line with the
  128. preceding line.
  129.  
  130.    Emacs can split lines automatically when they become too long, if you
  131. turn on a special minor mode called "Auto Fill" mode.  *Note Filling::,
  132. for how to use Auto Fill mode.
  133.  
  134.    If you prefer to have text characters replace (overwrite) existing
  135. text rather than shove it to the right, you can enable Overwrite mode,
  136. a minor mode.  *Note Minor Modes::.
  137.  
  138.    Direct insertion works for printing characters and SPC, but other
  139. characters act as editing commands and do not insert themselves.  If you
  140. need to insert a control character or a character whose code is above
  141. 200 octal, you must "quote" it by typing the character `Control-q'
  142. (`quoted-insert') first.  (This character's name is normally written
  143. `C-q' for short.)  There are two ways to use `C-q':
  144.  
  145.    * `C-q' followed by any non-graphic character (even `C-g') inserts
  146.      that character.
  147.  
  148.    * `C-q' followed by three octal digits inserts the character with
  149.      the specified character code.
  150.  
  151. A numeric argument to `C-q' specifies how many copies of the quoted
  152. character should be inserted (*note Arguments::.).
  153.  
  154.    Customization information: DEL in most modes runs the command
  155. `delete-backward-char'; RET runs the command `newline', and
  156. self-inserting printing characters run the command `self-insert', which
  157. inserts whatever character was typed to invoke it.  Some major modes
  158. rebind DEL to other commands.
  159.  
  160. 
  161. File: emacs,  Node: Moving Point,  Next: Erasing,  Prev: Inserting Text,  Up: Basic
  162.  
  163. Changing the Location of Point
  164. ==============================
  165.  
  166.    To do more than insert characters, you have to know how to move point
  167. (*note Point::.).  The simplest way to do this is with arrow keys, or by
  168. clicking the left mouse button where you want to move to.
  169.  
  170.    There are also control and meta characters for cursor motion.  Some
  171. are equivalent to the arrow keys (these date back to the days before
  172. terminals had arrow keys, and are usable on terminals which don't have
  173. them).  Others do more sophisticated things.
  174.  
  175. `C-a'
  176.      Move to the beginning of the line (`beginning-of-line').
  177.  
  178. `C-e'
  179.      Move to the end of the line (`end-of-line').
  180.  
  181. `C-f'
  182.      Move forward one character (`forward-char').
  183.  
  184. `C-b'
  185.      Move backward one character (`backward-char').
  186.  
  187. `M-f'
  188.      Move forward one word (`forward-word').
  189.  
  190. `M-b'
  191.      Move backward one word (`backward-word').
  192.  
  193. `C-n'
  194.      Move down one line, vertically (`next-line').  This command
  195.      attempts to keep the horizontal position unchanged, so if you
  196.      start in the middle of one line, you end in the middle of the
  197.      next.  When on the last line of text, `C-n' creates a new line and
  198.      moves onto it.
  199.  
  200. `C-p'
  201.      Move up one line, vertically (`previous-line').
  202.  
  203. `M-r'
  204.      Move point to left margin, vertically centered in the window
  205.      (`move-to-window-line').  Text does not move on the screen.
  206.  
  207.      A numeric argument says which screen line to place point on.  It
  208.      counts screen lines down from the top of the window (zero for the
  209.      top line).  A negative argument counts lines from the bottom (-1
  210.      for the bottom line).
  211.  
  212. `M-<'
  213.      Move to the top of the buffer (`beginning-of-buffer').  With
  214.      numeric argument N, move to N/10 of the way from the top.  *Note
  215.      Arguments::, for more information on numeric arguments.
  216.  
  217. `M->'
  218.      Move to the end of the buffer (`end-of-buffer').
  219.  
  220. `M-x goto-char'
  221.      Read a number N and move point to character number N.  Position 1
  222.      is the beginning of the buffer.
  223.  
  224. `M-x goto-line'
  225.      Read a number N and move point to line number N.  Line 1 is the
  226.      beginning of the buffer.
  227.  
  228. `C-x C-n'
  229.      Use the current column of point as the "semipermanent goal column"
  230.      for `C-n' and `C-p' (`set-goal-column').  Henceforth, those
  231.      commands always move to this column in each line moved into, or as
  232.      close as possible given the contents of the line.  This goal
  233.      column remains in effect until canceled.
  234.  
  235. `C-u C-x C-n'
  236.      Cancel the goal column.  Henceforth, `C-n' and `C-p' once again
  237.      try to stick to a fixed horizontal position, as usual.
  238.  
  239.    If you set the variable `track-eol' to a non-`nil' value, then `C-n'
  240. and `C-p' when at the end of the starting line move to the end of
  241. another line.  Normally, `track-eol' is `nil'.  *Note Variables::, for
  242. how to set variables such as `track-eol'.
  243.  
  244.    Normally, `C-n' on the last line of a buffer appends a newline to
  245. it.  If the variable `next-line-add-newlines' is `nil', then `C-n' gets
  246. an error instead (like `C-p' on the first line).
  247.  
  248. 
  249. File: emacs,  Node: Erasing,  Next: Undo,  Prev: Moving Point,  Up: Basic
  250.  
  251. Erasing Text
  252. ============
  253.  
  254. `DEL'
  255.      Delete the character before point (`delete-backward-char').
  256.  
  257. `C-d'
  258.      Delete the character after point (`delete-char').
  259.  
  260. `C-k'
  261.      Kill to the end of the line (`kill-line').
  262.  
  263. `M-d'
  264.      Kill forward to the end of the next word (`kill-word').
  265.  
  266. `M-DEL'
  267.      Kill back to the beginning of the previous word
  268.      (`backward-kill-word').
  269.  
  270.    You already know about the DEL key which deletes the character
  271. before point (that is, before the cursor).  Another key, `Control-d'
  272. (`C-d' for short), deletes the character after point (that is, the
  273. character that the cursor is on).  This shifts the rest of the text on
  274. the line to the left.  If you type `C-d' at the end of a line, it joins
  275. together that line and the next line.
  276.  
  277.    To erase a larger amount of text, use the `C-k' key, which kills a
  278. line at a time.  If you type `C-k' at the beginning or middle of a
  279. line, it kills all the text up to the end of the line.  If you type
  280. `C-k' at the end of a line, it joins that line and the next line.
  281.  
  282.    *Note Killing::, for more flexible ways of killing text.
  283.  
  284. 
  285. File: emacs,  Node: Undo,  Next: Basic Files,  Prev: Erasing,  Up: Basic
  286.  
  287. Undoing Changes
  288. ===============
  289.  
  290.    You can undo all the recent changes in the buffer text, up to a
  291. certain point.  Each buffer records changes individually, and the undo
  292. command always applies to the current buffer.  Usually each editing
  293. command makes a separate entry in the undo records, but some commands
  294. such as `query-replace' make many entries, and very simple commands
  295. such as self-inserting characters are often grouped to make undoing less
  296. tedious.
  297.  
  298. `C-x u'
  299.      Undo one batch of changes--usually, one command worth (`undo').
  300.  
  301. `C-_'
  302.      The same.
  303.  
  304.    The command `C-x u' or `C-_' is how you undo.  The first time you
  305. give this command, it undoes the last change.  Point moves back to
  306. where it was before the command that made the change.
  307.  
  308.    Consecutive repetitions of `C-_' or `C-x u' undo earlier and earlier
  309. changes, back to the limit of the undo information available.  If all
  310. recorded changes have already been undone, the undo command prints an
  311. error message and does nothing.
  312.  
  313.    Any command other than an undo command breaks the sequence of undo
  314. commands.  Starting from that moment, the previous undo commands become
  315. ordinary changes that you can undo.  Thus, to redo changes you have
  316. undone, type `C-f' or any other command that will harmlessly break the
  317. sequence of undoing, then type more undo commands.
  318.  
  319.    If you notice that a buffer has been modified accidentally, the
  320. easiest way to recover is to type `C-_' repeatedly until the stars
  321. disappear from the front of the mode line.  At this time, all the
  322. modifications you made have been canceled.  Whenever an undo command
  323. makes the stars disappear from the mode line, it means that the buffer
  324. contents are the same as they were when the file was last read in or
  325. saved.
  326.  
  327.    If you do not remember whether you changed the buffer deliberately,
  328. type `C-_' once.  When you see the last change you made undone, you
  329. will see whether it was an intentional change.  If it was an accident,
  330. leave it undone.  If it was deliberate, redo the change as described
  331. above.
  332.  
  333.    Not all buffers record undo information.  Buffers whose names start
  334. with spaces don't; these buffers are used internally by Emacs and its
  335. extensions to hold text that users don't normally look at or edit.
  336.  
  337.    You cannot undo mere cursor motion; only changes in the buffer
  338. contents save undo information.  However, some cursor motion commands
  339. set the mark, so if you use these commands from time to time, you can
  340. move back to the neighborhoods you have moved through by popping the
  341. mark ring (*note Mark Ring::.).
  342.  
  343.    When the undo information for a buffer becomes too large, Emacs
  344. discards the oldest undo information from time to time (during garbage
  345. collection).  You can specify how much undo information to keep by
  346. setting two variables: `undo-limit' and `undo-strong-limit'.  Their
  347. values are expressed in units of bytes of space.
  348.  
  349.    The variable `undo-limit' sets a soft limit: Emacs keeps undo data
  350. for enough commands to reach this size, and perhaps exceed it, but does
  351. not keep data for any earlier commands beyond that.  Its default value
  352. is 20000.  The variable `undo-strong-limit' sets a stricter limit: the
  353. command which pushes the size past this amount is itself forgotten.
  354. Its default value is 30000.
  355.  
  356.    Regardless of the values of those variables, the most recent change
  357. is never discarded, so there is no danger that garbage collection
  358. occurring right after an unintentional large change might prevent you
  359. from undoing it.
  360.  
  361.    The reason the `undo' command has two keys, `C-x u' and `C-_', set
  362. up to run it is that it is worthy of a single-character key, but on
  363. some keyboards it is not obvious how to type `C-_'.  `C-x u' is an
  364. alternative you can type straightforwardly on any terminal.
  365.  
  366. 
  367. File: emacs,  Node: Basic Files,  Next: Basic Help,  Prev: Undo,  Up: Basic
  368.  
  369. Files
  370. =====
  371.  
  372.    The commands described above are sufficient for creating and altering
  373. text in an Emacs buffer; the more advanced Emacs commands just make
  374. things easier.  But to keep any text permanently you must put it in a
  375. "file".  Files are named units of text which are stored by the
  376. operating system for you to retrieve later by name.  To look at or use
  377. the contents of a file in any way, including editing the file with
  378. Emacs, you must specify the file name.
  379.  
  380.    Consider a file named `/usr/rms/foo.c'.  In Emacs, to begin editing
  381. this file, type
  382.  
  383.      C-x C-f /usr/rms/foo.c RET
  384.  
  385. Here the file name is given as an "argument" to the command `C-x C-f'
  386. (`find-file').  That command uses the "minibuffer" to read the
  387. argument, and you type RET to terminate the argument (*note
  388. Minibuffer::.).
  389.  
  390.    Emacs obeys the command by "visiting" the file: creating a buffer,
  391. copying the contents of the file into the buffer, and then displaying
  392. the buffer for you to edit.  If you alter the text, you can "save" the
  393. new text in the file by typing `C-x C-s' (`save-buffer').  This makes
  394. the changes permanent by copying the altered buffer contents back into
  395. the file `/usr/rms/foo.c'.  Until you save, the changes exist only
  396. inside Emacs, and the file `foo.c' is unaltered.
  397.  
  398.    To create a file, just visit the file with `C-x C-f' as if it
  399. already existed.  This creates an empty buffer in which you can insert
  400. the text you want to put in the file.  The file is actually created when
  401. you save this buffer with `C-x C-s'.
  402.  
  403.    Of course, there is a lot more to learn about using files.  *Note
  404. Files::.
  405.  
  406. 
  407. File: emacs,  Node: Basic Help,  Next: Blank Lines,  Prev: Basic Files,  Up: Basic
  408.  
  409. Help
  410. ====
  411.  
  412.    If you forget what a key does, you can find out with the Help
  413. character, which is `C-h' (or F1, which is an alias for `C-h').  Type
  414. `C-h k' followed by the key you want to know about; for example, `C-h k
  415. C-n' tells you all about what `C-n' does.  `C-h' is a prefix key; `C-h
  416. k' is just one of its subcommands (the command `describe-key').  The
  417. other subcommands of `C-h' provide different kinds of help.  Type `C-h'
  418. twice to get a description of all the help facilities.  *Note Help::.
  419.  
  420. 
  421. File: emacs,  Node: Blank Lines,  Next: Continuation Lines,  Prev: Basic Help,  Up: Basic
  422.  
  423. Blank Lines
  424. ===========
  425.  
  426.    Here are special commands and techniques for putting in and taking
  427. out blank lines.
  428.  
  429. `C-o'
  430.      Insert one or more blank lines after the cursor (`open-line').
  431.  
  432. `C-x C-o'
  433.      Delete all but one of many consecutive blank lines
  434.      (`delete-blank-lines').
  435.  
  436.    When you want to insert a new line of text before an existing line,
  437. you can do it by typing the new line of text, followed by RET.
  438. However, it may be easier to see what you are doing if you first make a
  439. blank line and then insert the desired text into it.  This is easy to do
  440. using the key `C-o' (`open-line'), which inserts a newline after point
  441. but leaves point in front of the newline.  After `C-o', type the text
  442. for the new line.  `C-o F O O' has the same effect as `F O O RET',
  443. except for the final location of point.
  444.  
  445.    You can make several blank lines by typing `C-o' several times, or
  446. by giving it a numeric argument to tell it how many blank lines to make.
  447. *Note Arguments::, for how.  If you have a fill prefix, then `C-o'
  448. command inserts the fill prefix on the new line, when you use it at the
  449. beginning of a line.  *Note Fill Prefix::.
  450.  
  451.    The easy way to get rid of extra blank lines is with the command
  452. `C-x C-o' (`delete-blank-lines').  `C-x C-o' in a run of several blank
  453. lines deletes all but one of them.  `C-x C-o' on a solitary blank line
  454. deletes that blank line.  When point is on a nonblank line, `C-x C-o'
  455. deletes any blank lines following that nonblank line.
  456.  
  457. 
  458. File: emacs,  Node: Continuation Lines,  Next: Position Info,  Prev: Blank Lines,  Up: Basic
  459.  
  460. Continuation Lines
  461. ==================
  462.  
  463.    If you add too many characters to one line without breaking it with
  464. RET, the line will grow to occupy two (or more) lines on the screen,
  465. with a `\' at the extreme right margin of all but the last of them.
  466. The `\' says that the following screen line is not really a distinct
  467. line in the text, but just the "continuation" of a line too long to fit
  468. the screen.  Continuation is also called "line wrapping".
  469.  
  470.    Sometimes it is nice to have Emacs insert newlines automatically when
  471. a line gets too long.  Continuation on the screen does not do that.  Use
  472. Auto Fill mode (*note Filling::.) if that's what you want.
  473.  
  474.    As an alternative to continuation, Emacs can display long lines by
  475. "truncation".  This means that all the characters that do not fit in
  476. the width of the screen or window do not appear at all.  They remain in
  477. the buffer, temporarily invisible.  `$' is used in the last column
  478. instead of `\' to inform you that truncation is in effect.
  479.  
  480.    Truncation instead of continuation happens whenever horizontal
  481. scrolling is in use, and optionally in all side-by-side windows (*note
  482. Windows::.).  You can enable truncation for a particular buffer by
  483. setting the variable `truncate-lines' to non-`nil' in that buffer.
  484. (*Note Variables::.)  Altering the value of `truncate-lines' makes it
  485. local to the current buffer; until that time, the default value is in
  486. effect.  The default is initially `nil'.  *Note Locals::.
  487.  
  488.    *Note Display Vars::, for additional variables that affect how text
  489. is displayed.
  490.  
  491. 
  492. File: emacs,  Node: Position Info,  Next: Arguments,  Prev: Continuation Lines,  Up: Basic
  493.  
  494. Cursor Position Information
  495. ===========================
  496.  
  497.    Here are commands to get information about the size and position of
  498. parts of the buffer, and to count lines.
  499.  
  500. `M-x what-page'
  501.      Print page number of point, and line number within page.
  502.  
  503. `M-x what-line'
  504.      Print line number of point in the buffer.
  505.  
  506. `M-x line-number-mode'
  507.      Toggle automatic display of current line number.
  508.  
  509. `M-='
  510.      Print number of lines in the current region (`count-lines-region').
  511.      *Note Mark::, for information about the region.
  512.  
  513. `C-x ='
  514.      Print character code of character after point, character position
  515.      of point, and column of point (`what-cursor-position').
  516.  
  517.    There are two commands for working with line numbers.  `M-x
  518. what-line' computes the current line number and displays it in the echo
  519. area.  To go to a given line by number, use `M-x goto-line'; it prompts
  520. you for the number.  These line numbers count from one at the beginning
  521. of the buffer.
  522.  
  523.    You can also see the current line number in the mode line; *Note
  524. Mode Line::.  If you narrow the buffer, then the line number in the
  525. mode line is relative to the accessible portion (*note Narrowing::.).
  526. By contrast, `what-line' shows both the line number relative to the
  527. narrowed region and the line number relative to the whole buffer.
  528.  
  529.    By contrast, `M-x what-page' counts pages from the beginning of the
  530. file, and counts lines within the page, printing both numbers.  *Note
  531. Pages::.
  532.  
  533.    While on this subject, we might as well mention `M-='
  534. (`count-lines-region'), which prints the number of lines in the region
  535. (*note Mark::.).  *Note Pages::, for the command `C-x l' which counts
  536. the lines in the current page.
  537.  
  538.    The command `C-x =' (`what-cursor-position') can be used to find out
  539. the column that the cursor is in, and other miscellaneous information
  540. about point.  It prints a line in the echo area that looks like this:
  541.  
  542.      Char: c (0143, 99, 0x63)  point=21044 of 26883(78%)  column 53
  543.  
  544. (In fact, this is the output produced when point is before the `column'
  545. in the example.)
  546.  
  547.    The two values after `Char:' describe the character that follows
  548. point, first by showing it and second by giving its octal character
  549. code.
  550.  
  551.    `point=' is followed by the position of point expressed as a
  552. character count.  The front of the buffer counts as position 1, one
  553. character later as 2, and so on.  The next, larger number is the total
  554. number of characters in the buffer.  Afterward in parentheses comes the
  555. position expressed as a percentage of the total size.
  556.  
  557.    `column' is followed by the horizontal position of point, in columns
  558. from the left edge of the window.
  559.  
  560.    If the buffer has been narrowed, making some of the text at the
  561. beginning and the end temporarily inaccessible, `C-x =' prints
  562. additional text describing the currently accessible range.  For
  563. example, it might display this:
  564.  
  565.      Char: C (0103, 67, 0x43)  point=22015 of 26889(82%) <21660 - 22099>  column 0
  566.  
  567. where the two extra numbers give the smallest and largest character
  568. position that point is allowed to assume.  The characters between those
  569. two positions are the accessible ones.  *Note Narrowing::.
  570.  
  571.    If point is at the end of the buffer (or the end of the accessible
  572. part), `C-x =' omits any description of the character after point.  The
  573. output might look like this:
  574.  
  575.      point=26957 of 26956(100%)  column 0
  576.  
  577. 
  578. File: emacs,  Node: Arguments,  Prev: Position Info,  Up: Basic
  579.  
  580. Numeric Arguments
  581. =================
  582.  
  583.    In mathematics and computer usage, the word "argument" means "data
  584. provided to a function or operation."  You can give any Emacs command a
  585. "numeric argument" (also called a "prefix argument").  Some commands
  586. interpret the argument as a repetition count.  For example, `C-f' with
  587. an argument of ten moves forward ten characters instead of one.  With
  588. these commands, no argument is equivalent to an argument of one.
  589. Negative arguments tell most such commands to move or act in the
  590. opposite direction.
  591.  
  592.    If your terminal keyboard has a META key, the easiest way to specify
  593. a numeric argument is to type digits and/or a minus sign while holding
  594. down the the META key.  For example,
  595.      M-5 C-n
  596.  
  597. would move down five lines.  The characters `Meta-1', `Meta-2', and so
  598. on, as well as `Meta--', do this because they are keys bound to
  599. commands (`digit-argument' and `negative-argument') that are defined to
  600. contribute to an argument for the next command.  Digits and `-'
  601. modified with Control, or Control and Meta, also specify numeric
  602. arguments.
  603.  
  604.    Another way of specifying an argument is to use the `C-u'
  605. (`universal-argument') command followed by the digits of the argument.
  606. With `C-u', you can type the argument digits without holding down
  607. modifier keys; `C-u' works on all terminals.  To type a negative
  608. argument, type a minus sign after `C-u'.  Just a minus sign without
  609. digits normally means -1.
  610.  
  611.    `C-u' followed by a character which is neither a digit nor a minus
  612. sign has the special meaning of "multiply by four".  It multiplies the
  613. argument for the next command by four.  `C-u' twice multiplies it by
  614. sixteen.  Thus, `C-u C-u C-f' moves forward sixteen characters.  This
  615. is a good way to move forward "fast", since it moves about 1/5 of a line
  616. in the usual size screen.  Other useful combinations are `C-u C-n',
  617. `C-u C-u C-n' (move down a good fraction of a screen), `C-u C-u C-o'
  618. (make "a lot" of blank lines), and `C-u C-k' (kill four lines).
  619.  
  620.    Some commands care only about whether there is an argument, and not
  621. about its value.  For example, the command `M-q' (`fill-paragraph') with
  622. no argument fills text; with an argument, it justifies the text as well.
  623. (*Note Filling::, for more information on `M-q'.)  Plain `C-u' is a
  624. handy way of providing an argument for such commands.
  625.  
  626.    Some commands use the value of the argument as a repeat count, but do
  627. something peculiar when there is no argument.  For example, the command
  628. `C-k' (`kill-line') with argument N kills N lines, including their
  629. terminating newlines.  But `C-k' with no argument is special: it kills
  630. the text up to the next newline, or, if point is right at the end of
  631. the line, it kills the newline itself.  Thus, two `C-k' commands with
  632. no arguments can kill a nonblank line, just like `C-k' with an argument
  633. of one.  (*Note Killing::, for more information on `C-k'.)
  634.  
  635.    A few commands treat a plain `C-u' differently from an ordinary
  636. argument.  A few others may treat an argument of just a minus sign
  637. differently from an argument of -1.  These unusual cases are described
  638. when they come up; they are always for reasons of convenience of use of
  639. the individual command.
  640.  
  641.    You can use a numeric argument to insert multiple copies of a
  642. character.  This is straightforward unless the character is a digit; for
  643. example, `C-u 6 4 a' inserts 64 copies of the character `a'.  But this
  644. does not work for inserting digits; `C-u 6 4 1' specifies an argument
  645. of 641, rather than inserting anything.  To separate the digit to
  646. insert from the argument, type another `C-u'; for example, `C-u 6 4 C-u
  647. 1' does insert 64 copies of the character `1'.
  648.  
  649.    We use the term "prefix argument" as well as "numeric argument" to
  650. emphasize that you type the argument before the command, and to
  651. distinguish these arguments from minibuffer arguments that come after
  652. the command.
  653.  
  654. 
  655. File: emacs,  Node: Minibuffer,  Next: M-x,  Prev: Basic,  Up: Top
  656.  
  657. The Minibuffer
  658. **************
  659.  
  660.    The "minibuffer" is the facility used by Emacs commands to read
  661. arguments more complicated than a single number.  Minibuffer arguments
  662. can be file names, buffer names, Lisp function names, Emacs command
  663. names, Lisp expressions, and many other things, depending on the command
  664. reading the argument.  You can use the usual Emacs editing commands in
  665. the minibuffer to edit the argument text.
  666.  
  667.    When the minibuffer is in use, it appears in the echo area, and the
  668. terminal's cursor moves there.  The beginning of the minibuffer line
  669. displays a "prompt" which says what kind of input you should supply and
  670. how it will be used.  Often this prompt is derived from the name of the
  671. command that the argument is for.  The prompt normally ends with a
  672. colon.
  673.  
  674.    Sometimes a "default argument" appears in parentheses after the
  675. colon; it too is part of the prompt.  The default will be used as the
  676. argument value if you enter an empty argument (e.g., just type RET).
  677. For example, commands that read buffer names always show a default,
  678. which is the name of the buffer that will be used if you type just RET.
  679.  
  680.    The simplest way to enter a minibuffer argument is to type the text
  681. you want, terminated by RET which exits the minibuffer.  You can cancel
  682. the command that wants the argument, and get out of the minibuffer, by
  683. typing `C-g'.
  684.  
  685.    Since the minibuffer uses the screen space of the echo area, it can
  686. conflict with other ways Emacs customarily uses the echo area.  Here is
  687. how Emacs handles such conflicts:
  688.  
  689.    * If a command gets an error while you are in the minibuffer, this
  690.      does not cancel the minibuffer.  However, the echo area is needed
  691.      for the error message and therefore the minibuffer itself is
  692.      hidden for a while.  It comes back after a few seconds, or as soon
  693.      as you type anything.
  694.  
  695.    * If in the minibuffer you use a command whose purpose is to print a
  696.      message in the echo area, such as `C-x =', the message is printed
  697.      normally, and the minibuffer is hidden for a while.  It comes back
  698.      after a few seconds, or as soon as you type anything.
  699.  
  700.    * Echoing of keystrokes does not take place while the minibuffer is
  701.      in use.
  702.  
  703. * Menu:
  704.  
  705. * File: Minibuffer File.  Entering file names with the minibuffer.
  706. * Edit: Minibuffer Edit.  How to edit in the minibuffer.
  707. * Completion::          An abbreviation facility for minibuffer input.
  708. * Minibuffer History::    Reusing recent minibuffer arguments.
  709. * Repetition::          Re-executing commands that used the minibuffer.
  710.  
  711. 
  712. File: emacs,  Node: Minibuffer File,  Next: Minibuffer Edit,  Up: Minibuffer
  713.  
  714. Minibuffers for File Names
  715. ==========================
  716.  
  717.    Sometimes the minibuffer starts out with text in it.  For example,
  718. when you are supposed to give a file name, the minibuffer starts out
  719. containing the "default directory", which ends with a slash.  This is
  720. to inform you which directory the file will be found in if you do not
  721. specify a directory.
  722.  
  723.    For example, the minibuffer might start out with these contents:
  724.  
  725.      Find File: /u2/emacs/src/
  726.  
  727. where `Find File: ' is the prompt.  Typing `buffer.c' specifies the
  728. file `/u2/emacs/src/buffer.c'.  To find files in nearby directories,
  729. use `..'; thus, if you type `../lisp/simple.el', you will get the file
  730. named `/u2/emacs/lisp/simple.el'.  Alternatively, you can kill with
  731. `M-DEL' the directory names you don't want (*note Words::.).
  732.  
  733.    If you don't want any of the default, you can kill it with `C-a
  734. C-k'.  But you don't need to kill the default; you can simply ignore it.
  735. Insert an absolute file name, one starting with a slash or a tilde,
  736. after the default directory.  For example, to specify the file
  737. `/etc/termcap', just insert that name, giving these minibuffer contents:
  738.  
  739.      Find File: /u2/emacs/src//etc/termcap
  740.  
  741. Two slashes in a row are not normally meaningful in a file name, but
  742. they are allowed in GNU Emacs.  They mean, "ignore everything before
  743. the second slash in the pair."  Thus, `/u2/emacs/src/' is ignored in
  744. the example above, and you get the file `/etc/termcap'.
  745.  
  746.    If you set `insert-default-directory' to `nil', the default
  747. directory is not inserted in the minibuffer.  This way, the minibuffer
  748. starts out empty.  But the name you type, if relative, is still
  749. interpreted with respect to the same default directory.
  750.  
  751. 
  752. File: emacs,  Node: Minibuffer Edit,  Next: Completion,  Prev: Minibuffer File,  Up: Minibuffer
  753.  
  754. Editing in the Minibuffer
  755. =========================
  756.  
  757.    The minibuffer is an Emacs buffer (albeit a peculiar one), and the
  758. usual Emacs commands are available for editing the text of an argument
  759. you are entering.
  760.  
  761.    Since RET in the minibuffer is defined to exit the minibuffer, you
  762. can't use it to insert a newline in the minibuffer.  To do that, type
  763. `C-o' or `C-q LFD'.  (Recall that a newline is really the LFD
  764. character.)
  765.  
  766.    The minibuffer has its own window which always has space on the
  767. screen but acts as if it were not there when the minibuffer is not in
  768. use.  When the minibuffer is in use, its window is just like the
  769. others; you can switch to another window with `C-x o', edit text in
  770. other windows and perhaps even visit more files, before returning to
  771. the minibuffer to submit the argument.  You can kill text in another
  772. window, return to the minibuffer window, and then yank the text to use
  773. it in the argument.  *Note Windows::.
  774.  
  775.    There are some restrictions on the use of the minibuffer window,
  776. however.  You cannot switch buffers in it--the minibuffer and its
  777. window are permanently attached.  Also, you cannot split or kill the
  778. minibuffer window.  But you can make it taller in the normal fashion
  779. with `C-x ^'.  If you enable Resize-Minibuffer mode, then the
  780. minibuffer window expands vertically as necessary to hold the text that
  781. you put in the minibuffer.  Use `M-x resize-minibuffer-mode' to enable
  782. or disable this minor mode (*note Minor Modes::.).
  783.  
  784.    If while in the minibuffer you issue a command that displays help
  785. text of any sort in another window, you can use the `C-M-v' command
  786. while in the minibuffer to scroll the help text.  This lasts until you
  787. exit the minibuffer.  This feature is especially useful if a completing
  788. minibuffer gives you a list of possible completions.  *Note Other
  789. Window::.
  790.  
  791.    Emacs normally disallows most commands that use the minibuffer while
  792. the minibuffer is selected.  This rule is to prevent recursive
  793. minibuffers from confusing novice users.  If you want to be able to use
  794. such commands in the minibuffer, set the variable
  795. `enable-recursive-minibuffers' to a non-`nil' value.
  796.  
  797. 
  798. File: emacs,  Node: Completion,  Next: Minibuffer History,  Prev: Minibuffer Edit,  Up: Minibuffer
  799.  
  800. Completion
  801. ==========
  802.  
  803.    For certain kinds of arguments, you can use "completion" to enter
  804. the argument value.  Completion means that you type part of the
  805. argument, then Emacs visibly fills in the rest, or as much as can be
  806. determined from the part you have typed.
  807.  
  808.    When completion is available, certain keys--TAB, RET, and SPC--are
  809. rebound to complete the text present in the minibuffer into a longer
  810. string that it stands for, by matching it against a set of "completion
  811. alternatives" provided by the command reading the argument.  `?' is
  812. defined to display a list of possible completions of what you have
  813. inserted.
  814.  
  815.    For example, when `M-x' uses the minibuffer to read the name of a
  816. command, it provides a list of all available Emacs command names to
  817. complete against.  The completion keys match the text in the minibuffer
  818. against all the command names, find any additional name characters
  819. implied by the ones already present in the minibuffer, and add those
  820. characters to the ones you have given.  This is what makes it possible
  821. to type `M-x ins SPC b RET' instead of `M-x insert-buffer RET' (for
  822. example).
  823.  
  824.    Case is normally significant in completion, because it is significant
  825. in most of the names that you can complete (buffer names, file names and
  826. command names).  Thus, `fo' does not complete to `Foo'.  Completion
  827. does ignore case distinctions for certain arguments in which case does
  828. not matter.
  829.  
  830. * Menu:
  831.  
  832. * Example: Completion Example.
  833. * Commands: Completion Commands.
  834. * Strict Completion::
  835. * Options: Completion Options.
  836.  
  837. 
  838. File: emacs,  Node: Completion Example,  Next: Completion Commands,  Up: Completion
  839.  
  840. Completion Example
  841. ------------------
  842.  
  843.    A concrete example may help here.  If you type `M-x au TAB', the TAB
  844. looks for alternatives (in this case, command names) that start with
  845. `au'.  There are only two: `auto-fill-mode' and `auto-save-mode'.
  846. These are the same as far as `auto-', so the `au' in the minibuffer
  847. changes to `auto-'.
  848.  
  849.    If you type TAB again immediately, there are multiple possibilities
  850. for the very next character--it could be `s' or `f'--so no more
  851. characters are added; instead, TAB displays a list of all possible
  852. completions in another window.
  853.  
  854.    If you go on to type `f TAB', this TAB sees `auto-f'.  The only
  855. command name starting this way is `auto-fill-mode', so completion fills
  856. in the rest of that.  You now have `auto-fill-mode' in the minibuffer
  857. after typing just `au TAB f TAB'.  Note that TAB has this effect
  858. because in the minibuffer it is bound to the command
  859. `minibuffer-complete' when completion is available.
  860.  
  861. 
  862. File: emacs,  Node: Completion Commands,  Next: Strict Completion,  Prev: Completion Example,  Up: Completion
  863.  
  864. Completion Commands
  865. -------------------
  866.  
  867.    Here is a list of the completion commands defined in the minibuffer
  868. when completion is available.
  869.  
  870. `TAB'
  871.      Complete the text in the minibuffer as much as possible
  872.      (`minibuffer-complete').
  873.  
  874. `SPC'
  875.      Complete the minibuffer text, but don't go beyond one word
  876.      (`minibuffer-complete-word').
  877.  
  878. `RET'
  879.      Submit the text in the minibuffer as the argument, possibly
  880.      completing first as described below
  881.      (`minibuffer-complete-and-exit').
  882.  
  883. `?'
  884.      Print a list of all possible completions of the text in the
  885.      minibuffer (`minibuffer-list-completions').
  886.  
  887.    SPC completes much like TAB, but never goes beyond the next hyphen
  888. or space.  If you have `auto-f' in the minibuffer and type SPC, it
  889. finds that the completion is `auto-fill-mode', but it stops completing
  890. after `fill-'.  This gives `auto-fill-'.  Another SPC at this point
  891. completes all the way to `auto-fill-mode'.  SPC in the minibuffer when
  892. completion is available runs the command `minibuffer-complete-word'.
  893.  
  894.    Here are some commands you can use to choose a completion from a
  895. window that displays a list of completions:
  896.  
  897. `Mouse-2'
  898.      Clicking mouse button 2 on a completion in the list of possible
  899.      completions chooses that completion (`mouse-choose-completion').
  900.      You normally use this command while point is in the minibuffer;
  901.      but you must click in the list of completions, not in the
  902.      minibuffer itself.
  903.  
  904. `PRIOR'
  905. `M-v'
  906.      Typing PRIOR or PAGE-UP, or `M-v', while in the minibuffer,
  907.      selects the window showing the completion list buffer
  908.      (`switch-to-completions').  This paves the way for using the
  909.      commands below.  (Selecting that window in the usual ways has the
  910.      same effect, but this way is more convenient.)
  911.  
  912. `RET'
  913.      Typing RET *in the completion list buffer* chooses the completion
  914.      that point is in or next to (`choose-completion').  To use this
  915.      command, you must first switch windows to the window that shows
  916.      the list of completions.
  917.  
  918. `RIGHT'
  919.      Typing the right-arrow key RIGHT *in the completion list buffer*
  920.      moves point to the following completion (`next-completion').
  921.  
  922. `LEFT'
  923.      Typing the left-arrow key LEFT *in the completion list buffer*
  924.      moves point toward the beginning of the buffer, to the previous
  925.      completion (`previous-completion').
  926.  
  927. 
  928. File: emacs,  Node: Strict Completion,  Next: Completion Options,  Prev: Completion Commands,  Up: Completion
  929.  
  930. Strict Completion
  931. -----------------
  932.  
  933.    There are three different ways that RET can work in completing
  934. minibuffers, depending on how the argument will be used.
  935.  
  936.    * "Strict" completion is used when it is meaningless to give any
  937.      argument except one of the known alternatives.  For example, when
  938.      `C-x k' reads the name of a buffer to kill, it is meaningless to
  939.      give anything but the name of an existing buffer.  In strict
  940.      completion, RET refuses to exit if the text in the minibuffer does
  941.      not complete to an exact match.
  942.  
  943.    * "Cautious" completion is similar to strict completion, except that
  944.      RET exits only if the text was an exact match already, not needing
  945.      completion.  If the text is not an exact match, RET does not exit,
  946.      but it does complete the text.  If it completes to an exact match,
  947.      a second RET will exit.
  948.  
  949.      Cautious completion is used for reading file names for files that
  950.      must already exist.
  951.  
  952.    * "Permissive" completion is used when any string whatever is
  953.      meaningful, and the list of completion alternatives is just a
  954.      guide.  For example, when `C-x C-f' reads the name of a file to
  955.      visit, any file name is allowed, in case you want to create a
  956.      file.  In permissive completion, RET takes the text in the
  957.      minibuffer exactly as given, without completing it.
  958.  
  959.    The completion commands display a list of all possible completions in
  960. a window whenever there is more than one possibility for the very next
  961. character.  Also, typing `?' explicitly requests such a list.  If the
  962. list of completions is long, you can scroll it with `C-M-v' (*note
  963. Other Window::.).
  964.  
  965. 
  966. File: emacs,  Node: Completion Options,  Prev: Strict Completion,  Up: Completion
  967.  
  968. Completion Options
  969. ------------------
  970.  
  971.    When completion is done on file names, certain file names are usually
  972. ignored.  The variable `completion-ignored-extensions' contains a list
  973. of strings; a file whose name ends in any of those strings is ignored
  974. as a possible completion.  The standard value of this variable has
  975. several elements including `".o"', `".elc"', `".dvi"' and `"~"'.  The
  976. effect is that, for example, `foo' can complete to `foo.c' even though
  977. `foo.o' exists as well.  However, if *all* the possible completions end
  978. in "ignored" strings, then they are not ignored.  Ignored extensions do
  979. not apply to lists of completions--those always mention all possible
  980. completions.
  981.  
  982.    Normally, a completion command that finds the next character is
  983. undetermined automatically displays a list of all possible completions.
  984. If the variable `completion-auto-help' is set to `nil', this does not
  985. happen, and you must type `?' to display the possible completions.
  986.  
  987.    The `complete' library implements a more powerful kind of completion
  988. that can complete multiple words at a time.  For example, it can
  989. complete the command name abbreviation `p-b' into `print-buffer',
  990. because no other command starts with two words whose initials are `p'
  991. and `b'.  To use this library, put `(load "complete")' in your
  992. `~/.emacs' file (*note Init File::.).
  993.  
  994.    Icomplete mode presents a constantly-updated display that tells you
  995. what completions are available for the text you've entered so far.  The
  996. command to enable or disable this minor mode is `M-x icomplete-mode'.
  997.  
  998. 
  999. File: emacs,  Node: Minibuffer History,  Next: Repetition,  Prev: Completion,  Up: Minibuffer
  1000.  
  1001. Minibuffer History
  1002. ==================
  1003.  
  1004.    Every argument that you enter with the minibuffer is saved on a
  1005. "minibuffer history list" so that you can use it again later in another
  1006. argument.  Special commands load the text of an earlier argument in the
  1007. minibuffer.  They discard the old minibuffer contents, so you can think
  1008. of them as moving through the history of previous arguments.
  1009.  
  1010. `M-p'
  1011.      Move to the next earlier argument string saved in the minibuffer
  1012.      history (`previous-history-element').
  1013.  
  1014. `M-n'
  1015.      Move to the next later argument string saved in the minibuffer
  1016.      history (`next-history-element').
  1017.  
  1018. `M-r REGEXP RET'
  1019.      Move to an earlier saved argument in the minibuffer history that
  1020.      has a match for REGEXP (`previous-matching-history-element').
  1021.  
  1022. `M-s REGEXP RET'
  1023.      Move to a later saved argument in the minibuffer history that has a
  1024.      match for REGEXP (`next-matching-history-element').
  1025.  
  1026.    The simplest way to reuse the saved arguments in the history list is
  1027. to move through the history list one element at a time.  While in the
  1028. minibuffer, type `M-p' (`previous-history-element') to "move to" the
  1029. next earlier minibuffer input, and use `M-n' (`next-history-element')
  1030. to "move to" the next later input.
  1031.  
  1032.    The previous input that you fetch from the history entirely replaces
  1033. the contents of the minibuffer.  To use it as the argument, exit the
  1034. minibuffer as usual with RET.  You can also edit the text before you
  1035. reuse it; this does not change the history element that you "moved" to,
  1036. but your new argument does go at the end of the history list in its own
  1037. right.
  1038.  
  1039.    There are also commands to search forward or backward through the
  1040. history.  As of this writing, they search for history elements that
  1041. match a regular expression that you specify with the minibuffer.  `M-r'
  1042. (`previous-matching-history-element') searches older elements in the
  1043. history, while `M-s' (`next-matching-history-element') searches newer
  1044. elements.  By special dispensation, these commands can use the
  1045. minibuffer to read their arguments even though you are already in the
  1046. minibuffer when you issue them.
  1047.  
  1048.    All uses of the minibuffer record your input on a history list, but
  1049. there are separate history lists for different kinds of arguments.  For
  1050. example, there is a list for file names, used by all the commands that
  1051. read file names.  There is a list for arguments of commands like
  1052. `query-replace'.  There are several very specific history lists,
  1053. including one for command names read by M-x and one for compilation
  1054. commands read by `compile'.  Finally, there is one "miscellaneous"
  1055. history list that most minibuffer arguments use.
  1056.  
  1057. 
  1058. File: emacs,  Node: Repetition,  Prev: Minibuffer History,  Up: Minibuffer
  1059.  
  1060. Repeating Minibuffer Commands
  1061. =============================
  1062.  
  1063.    Every command that uses the minibuffer at least once is recorded on a
  1064. special history list, together with the values of its arguments, so that
  1065. you can repeat the entire command.  In particular, every use of `M-x'
  1066. is recorded there, since `M-x' uses the minibuffer to read the command
  1067. name.
  1068.  
  1069. `C-x ESC ESC'
  1070.      Re-execute a recent minibuffer command (`repeat-complex-command').
  1071.  
  1072. `M-x list-command-history'
  1073.      Display the entire command history, showing all the commands `C-x
  1074.      ESC ESC' can repeat, most recent first.
  1075.  
  1076.    `C-x ESC ESC' is used to re-execute a recent minibuffer-using
  1077. command.  With no argument, it repeats the last such command.  A
  1078. numeric argument specifies which command to repeat; one means the last
  1079. one, and larger numbers specify earlier ones.
  1080.  
  1081.    `C-x ESC ESC' works by turning the previous command into a Lisp
  1082. expression and then entering a minibuffer initialized with the text for
  1083. that expression.  If you type just RET, the command is repeated as
  1084. before.  You can also change the command by editing the Lisp
  1085. expression.  Whatever expression you finally submit is what will be
  1086. executed.  The repeated command is added to the front of the command
  1087. history unless it is identical to the most recently executed command
  1088. already there.
  1089.  
  1090.    Even if you don't understand Lisp syntax, it will probably be obvious
  1091. which command is displayed for repetition.  If you do not change the
  1092. text, it will repeat exactly as before.
  1093.  
  1094.    Once inside the minibuffer for `C-x ESC ESC', you can use the
  1095. minibuffer history commands (`M-p', `M-n', `M-r', `M-s'; *note
  1096. Minibuffer History::.) to move through the history list of saved entire
  1097. commands.  After finding the desired previous command, you can edit its
  1098. expression as usual and then resubmit it by typing RET as usual.
  1099.  
  1100.    The list of previous minibuffer-using commands is stored as a Lisp
  1101. list in the variable `command-history'.  Each element is a Lisp
  1102. expression which describes one command and its arguments.  Lisp programs
  1103. can reexecute a command by calling `eval' with the `command-history'
  1104. element.
  1105.  
  1106.